﻿@model Transport.Areas.Administrator.Models.PostOfficeModel
@using (Html.BeginForm("Save", "PostOffice", FormMethod.Post))
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Areas/Administrator/Content/images/ico-catalog.png")" alt="" />
            @(Model.StateProvinceId > 0 ? "Sửa bưu cục" : "Tạo mới bưu cục")
        </div>
        <div class="options">
            <button type="submit" name="save" value="Save" tabindex="6" class="t-button">Lưu</button>
            <a href="@Url.Action("index")" tabindex="8" class="t-button">Quay về</a>
        </div>
    </div>
    
    @Html.HiddenFor(model => model.PostOfficeId)
    <table width="99%">
        <tr>
            <td class="adminTitle">
                @Html.Label("Tỉnh thành")
                <span class="field_required">*</span>
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.StateProvinceId, new SelectList(Model.StateProvinces, "StateProvinceId", "StateProvinceName"), "-Chọn-")
                @Html.ValidationMessageFor(model => model.StateProvinceId, "Tỉnh thành là bắt buộc chọn.")
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Tên bưu cục")
                <span class="field_required">*</span>
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.PostOfficeName)
                @Html.ValidationMessageFor(model => model.PostOfficeName)
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Mã bưu cục")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.PostOfficeCode)
                @Html.ValidationMessageFor(model => model.PostOfficeCode)
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Địa chỉ")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address)
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Số điện thoại")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.PhoneNumber)
                @Html.ValidationMessageFor(model => model.PhoneNumber)
            </td>
        </tr>
    </table>
}